* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    list-style: none;
}

.container {
    width: 500px;
    height: 280px;
    position: relative;
    top: 100px;
    left: 30%;
    border: 1px solid #000;
}

.container img {
    position: absolute;
    width: 100%;
    transition-duration: .3s;
    opacity: 0;
}

.container img.on{
    opacity: 1;
}

.left,.right {
    position: absolute;
            top: 30%;
            width: 60px;
            height: 100px;
            line-height: 100px;
            background-color: #666;
            opacity: 0.5;
            text-align: center;
            font-size: 60px;
            color: #ccc;
            display: none;    /*先隐藏按钮*/
            cursor: pointer;    /*设置鼠标悬停时的样式*/
} 

.left{
    left: 0;
}
.right{
    right: 0;
}
.container:hover .left, .container:hover .right{
    display: block;            /*鼠标悬停才容器范围内时显示按钮*/
}
.left:hover, .right:hover{
    color: #fff;
}
/*焦点*/
.container ul{
    position: absolute;
    bottom: 0;
    max-width: 500px;
    padding: 5px 200px;
}
.container ul li{
    list-style: none;
    float: left;
    background-color: #ccc;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-left: 10px;
    cursor: pointer;
}
.container ul li.active{
    background-color: #282923;        /*焦点激活时的样式*/
}